* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}



.container1 {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
  column-gap: 80px;
  width: 2000px;
  height: 600px;
  transition: .5s;
}

.container1 .image-wrap{
  position: relative;
  background: var(--img);
  background-position: center;
  background-size: cover;
  transition: .5s;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: grayscale(0) brightness(1.15);
}

.container1:hover .image-wrap{
  filter: grayscale(1);
}

.container1 .image-wrap:hover {
  filter: grayscale(0) brightness(1.15);
}

.container1:has(.image-wrap:nth-child(1):hover) {
  grid-template-columns: 5fr 1fr 1fr 1fr 1fr;
}
.container1:has(.image-wrap:nth-child(2):hover) {
  grid-template-columns: 1fr 5fr 1fr 1fr 1fr;
}
.container1:has(.image-wrap:nth-child(3):hover) {
  grid-template-columns: 1fr 1fr 5fr 1fr 1fr;
}
.container1:has(.image-wrap:nth-child(4):hover) {
  grid-template-columns: 1fr 1fr 1fr 5fr 1fr;
}
.container1:has(.image-wrap:nth-child(5):hover) {
  grid-template-columns: 1fr 1fr 1fr 1fr 5fr;
}

.container1 .image-wrap::before{
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(#ababab, transparent, transparent, transparent, #ababab);
}

.container1 .image-wrap:nth-child(even){
  transform: translateY(30px);
}

.container1 .image-wrap:nth-child(odd){
  transform: translateY(-30px);
}

.container1 .image-wrap::after{
  content: attr(data-text );
  position: absolute;
  bottom: -100px;
  background-color: #fff;
  color: #000;
  font-size: 16px;
  font-weight: 600;
  padding: 5px 10px;
  letter-spacing: 0.1em;
  white-space: nowrap;
  min-width: 100px;
  text-align: center;
  opacity: 0;
  transition: .5s;
  transition-delay: 0;
  -webkit-box-reflect: below 2px linear-gradient(transparent, #0004);
}

.container1 .image-wrap:hover::after {
  bottom: -50px;
  opacity: 1;
  transition-delay: .25s;
}


